package com.gem.mapper;

import com.gem.domain.CDailySpending;
import com.gem.util.ConditionUtil;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Update;

import java.util.List;

/**
 * @author Apolar_GuanYH-管阳红
 * Description: 日常经费数据映射
 * create 2019-10-19 19:21
 * Modified By:
 */
@Mapper
public interface CDailySpendingMapper {

    //查询所有
    List<CDailySpending> selectAllDS();

    //按编号查询
    CDailySpending selectDSById(Integer dsId);

    //查询所有市场的
    List<CDailySpending> selectDSForMarket();

    //按Uid查询
    List<CDailySpending> selectDSByUid(Integer uId);

    //条件查询
    List<CDailySpending> selectDSByCondition(ConditionUtil cu);

    //添加
    boolean addDS(CDailySpending CDailySpending);

    //伪删除
    @Update("UPDATE c_daily_spending SET ds_status=-1 WHERE ds_id=#{dsId}")
    boolean deleteDSById(Integer dsId);

    //修改
    boolean modifyDS(CDailySpending CDailySpending);

}
